package day01;

import java.util.Scanner;

public class ZT4 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int len = s.length();
        int count = 0;
        for (int i = 0; i < len - 1; i++) {
            int num1 = Integer.parseInt(String.valueOf(s.charAt(i)));
            int num2 = Integer.parseInt(String.valueOf(s.charAt(len - 1)));
            if ((num1 + num2) % 2 == 0) {
                count++;
            }
        }
        System.out.print(count);
    }
}
